% clc
clear

% ImgSet = 'Set5';
% ImgSet = 'Set14';
% ImgSet = 'General100';
% ImgSet = 'B100';
% ImgSet = 'Urban100';
ImgSet = {'Set5', 'Set14', 'B100', 'Urban100'};
% ImgSet = {'Set5', 'Set14', 'B100'};
% ImgSet = {'Set14', 'B100', 'Urban100'};

solver_mode = 'gpu 0';

way = 3;

switch way
    case 1
        startingNet = 'Bicubic';
        bPlotPSNRCurve = true;
        bPlotStartingPSNR = true;
        Net = {
            'scale',        3
            'path',         'VDSR-y-noskip-Scale(3)/VDSR_y_noskip1'
            'deploy_file',	'VDSR_y_noskip_deploy'
            'alias_names',	'VDSR_NoSkip_Bicubic_MSRA'
            'model_folders'  'models'
            'model_iters',	 '[110000 Inf]'
            'model_prefix',  'VDSR_y_noskip_iter_'
            };
    case 2
        startingNet = 'VDSR0';
        bPlotPSNRCurve = true;
        bPlotStartingPSNR = true;
        Net = {
            'scale',        4
            'path',         'VDSR0-VDSR-Scale(4)/VDSR_y1'
            'deploy_file',	'VDSR_y_deploy'
            'alias_names',	'VDSR_VDSR0_MSRA, VDSR_VDSR0_VDSR3'
            'model_folders'  'models, models_VDSR3'
            %'model_iters',	 '[], []'
            'model_iters',	 '[107000 97000], [73000 96000]'
            'model_prefix',  'VDSR_y_iter_'
            };
    case 3
        startingNet = 'FSRCNN';
        bPlotPSNRCurve = true;
        bPlotStartingPSNR = true;
        Net = {
            'scale',        2
            'path',         '%FSRCNN-VDSR(MSRA)-Scale(2)/VDSR_y1'
            'deploy_file',	'VDSR_y_deploy'
            'alias_names',	'VDSR_FSRCNN_MSRA, VDSR_FSRCNN_VDSR1, VDSR_FSRCNN_VDSR3'
            'model_folders'  'models, models_VDSR1, models_warmweights'
            'model_iters',	 '[], [], []'
            %'model_iters',	 '[107000 97000], [73000 96000]'
            'model_prefix',  'VDSR_y_iter_'
            };
end

[results1, results0] = sranaly.analyCascading(ImgSet, startingNet, Net, solver_mode, bPlotPSNRCurve, bPlotStartingPSNR);
